#include "View.h"
#include "Model.h"

View::View():model(Model::getInstance())
{
}

void View::Render()
{
	drawList.clear();
	playList.clear();
	//create renderlist
	model->Draw(&drawList, &playList);

	DX.Render(&drawList);

	for(int i=0;i<playList.Size();++i)
	{
		SoundStruct nextSound = playList.get(i);
		if(nextSound.Sound != NO_SOUND)
			sound.PlaySound(nextSound.Sound);
		if(nextSound.Music != NO_MUSIC)
			sound.PlayMusic(nextSound.Music);
	}
}